package cn.sharp.bbs.dao.admin;

import cn.sharp.bbs.dao.gen.UserMapper;
import cn.sharp.bbs.entity.BO.UserQuery;
import cn.sharp.bbs.entity.DO.Role;
import cn.sharp.bbs.entity.DO.Userrole;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserManageDao {
    List<UserMapper> queryUserList(UserQuery query);

    @Update("update t_user set user_state=#{state} where user_id=#{uid}")
    void editUserState(Long uid, int state);

    List<Role> listUserRole(Long uid);

    List<Role> listAllRole();

    void addUserRoles(List<Userrole> includeRoles);

    void delUserRoles(List<Userrole> excludeRoles);

    int getUserNum();

    int getPostNum();
}
